package top.shmly.universal.utils;

import cn.hutool.json.JSONUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.context.request.ServletRequestAttributes;
import top.shmly.universal.utils.impl.HttpRequestUtilImpl;

import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

public interface ResponseJsonUtils {

    /**
     * 通过ServletResponse返回JSon数据
     *
     * @param servletResponse response
     * @param httpStatus      HTTP状态码
     * @param object          数据
     */
    void sendMsgWithServletResponse(ServletResponse servletResponse, int httpStatus, Object object);

    /**
     * 通过ServletResponse返回JSon数据
     *
     * @param httpStatus HTTP状态码
     * @param object     数据
     */
    void sendMsgWithServletResponse(int httpStatus, Object object);
}